﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BEPUphysics.Entities;
using Microsoft.Xna.Framework;
using BEPUphysics.DataStructures;

namespace PloobsEngine.Physics.Bepu
{
    public class BoxObject : BepuEntityObject
    {
        public BoxObject(Vector3 pos, float xlen,float ylen,float zlen, float mass)
            : base(mass)
        {
            entity = new Box(pos, xlen, ylen, zlen, mass);
        }

        public BoxObject(Vector3 pos,float lengh,float mass) : base(mass)
        {            
            entity = new Box(pos, lengh, lengh, lengh, mass);            
        }

        public BoxObject(Vector3 pos, float lengh, float mass,Vector3 scale)
            : base(mass)
        {
            this.scale = scale;
            entity = new Box(pos, lengh * scale.X, lengh * scale.Y, lengh * scale.Z, mass);            
        }

        public BoxObject(Vector3 pos, Matrix orientation, float lengh, float mass, Vector3 scale)
            : base(mass)
        {
            this.scale = scale;
            entity = new Box(pos, lengh * scale.X, lengh * scale.Y, lengh * scale.Z, mass);
            entity.WorldTransform = orientation;
        }

        public BoxObject(Vector3 pos, float lengh, Vector3 scale)
            : base(0)
        { 
            this.scale = scale;
            entity = new Box(pos, lengh * scale.X, lengh * scale.Y, lengh * scale.Z);                        
        }

        
        
        public override PhysicObjectTypes PhysicObjectTypes
        {
            get
            {
                return PhysicObjectTypes.BOXOBJECT;
            }            
        }
    }
}
